package com.example.springeventlistenersample;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class AsnycTaskDealer {
    Logger log = LoggerFactory.getLogger(AsnycTaskDealer.class);
    @Async
    public void exec(){
        log.info("异步任务方法执行,所在线程名称："+Thread.currentThread().getName());
    }
}
